Sejak akhir tahun 2019, seluruh dunia telah digemparkan dengan semakin meningkatnya wabah Corona Virus -19 (Covid-19). Penyakit ini tidak hanya membuat kepanikan, namun banyak memakan korban jiwa. Covid-19 saat ini menjadi trend pembicaraan, perdebatan, diskusi dan bahan berita di medis cetak ataupun medis elektronik. Saat ini trend Covid-19 selalu menjadi trend nomor satu dan trending topic di semua media social tanpa terkecuali.covid-19 pertama kali diidentifikasi di Wuhan, ibu kota provinsi Hubei, China.Virus ini telah menunjukkan bukti penularan dari manusia ke manusia. Tingkat penularan (rate of infection) tampaknya meningkat pada pertengahan Januari 2020. Per 30 Januari 2020, sekitar 8.243 kasus telah dikonfirmasi
library(heatmaply) #Untuk plot heatmap Missing Data
## Loading required package: plotly
## Loading required package: ggplot2
##
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
##
## last_plot
## The following object is masked from 'package:stats':
##
## filter
## The following object is masked from 'package:graphics':
##
## layout
## Loading required package: viridis
## Loading required package: viridisLite
##
## ======================
## Welcome to heatmaply version 1.3.0
##
## Type citation('heatmaply') for how to cite the package.
## Type ?heatmaply for the main documentation.
##
## The github page is: https://github.com/talgalili/heatmaply/
## Please submit your suggestions and bug-reports at: https://github.com/talgalili/heatmaply/issues
## You may ask questions at stackoverflow, use the r and heatmaply tags:
## https://stackoverflow.com/questions/tagged/heatmaply
## ======================
library(visdat) #Untuk plot Missing Data
library(reshape2) #Modifikasi DataFrame
library(tidyr) #Modifikasi DataFrame
##
## Attaching package: 'tidyr'
## The following object is masked from 'package:reshape2':
##
## smiths
library(ggplot2) #Plot
library(psych) #Pair Plot
##
## Attaching package: 'psych'
## The following objects are masked from 'package:ggplot2':
##
## %+%, alpha
library(DataExplorer) #Corelation Plot
df <- read.csv("https://raw.githubusercontent.com/dwipaprasetyo/PSDS_Kelas_Dasar_3.0/main/country_wise_latest.csv", stringsAsFactors = T)
df[df==""] <- NA
df[0:5,]
## Country.Region Confirmed Deaths Recovered Active New.cases New.deaths
## 1 Afghanistan 36263 1269 25198 9796 106 10
## 2 Albania 4880 144 2745 1991 117 6
## 3 Algeria 27973 1163 18837 7973 616 8
## 4 Andorra 907 52 803 52 10 0
## 5 Angola 950 41 242 667 18 1
## New.recovered Deaths...100.Cases Recovered...100.Cases Deaths...100.Recovered
## 1 18 3.50 69.49 5.04
## 2 63 2.95 56.25 5.25
## 3 749 4.16 67.34 6.17
## 4 0 5.73 88.53 6.48
## 5 0 4.32 25.47 16.94
## Confirmed.last.week X1.week.change X1.week...increase WHO.Region
## 1 35526 737 2.07 Eastern Mediterranean
## 2 4171 709 17.00 Europe
## 3 23691 4282 18.07 Africa
## 4 884 23 2.60 Europe
## 5 749 201 26.84 Africa
dim(df)
## [1] 187 15
Artinya kita memiliki data dengan 15 kolom dan 187 baris
names(df)
## [1] "Country.Region" "Confirmed" "Deaths"
## [4] "Recovered" "Active" "New.cases"
## [7] "New.deaths" "New.recovered" "Deaths...100.Cases"
## [10] "Recovered...100.Cases" "Deaths...100.Recovered" "Confirmed.last.week"
## [13] "X1.week.change" "X1.week...increase" "WHO.Region"
str(df)
## 'data.frame': 187 obs. of 15 variables:
## $ Country.Region : Factor w/ 187 levels "Afghanistan",..: 1 2 3 4 5 6 7 8 9 10 ...
## $ Confirmed : int 36263 4880 27973 907 950 86 167416 37390 15303 20558 ...
## $ Deaths : int 1269 144 1163 52 41 3 3059 711 167 713 ...
## $ Recovered : int 25198 2745 18837 803 242 65 72575 26665 9311 18246 ...
## $ Active : int 9796 1991 7973 52 667 18 91782 10014 5825 1599 ...
## $ New.cases : int 106 117 616 10 18 4 4890 73 368 86 ...
## $ New.deaths : int 10 6 8 0 1 0 120 6 6 1 ...
## $ New.recovered : int 18 63 749 0 0 5 2057 187 137 37 ...
## $ Deaths...100.Cases : num 3.5 2.95 4.16 5.73 4.32 3.49 1.83 1.9 1.09 3.47 ...
## $ Recovered...100.Cases : num 69.5 56.2 67.3 88.5 25.5 ...
## $ Deaths...100.Recovered: num 5.04 5.25 6.17 6.48 16.94 ...
## $ Confirmed.last.week : int 35526 4171 23691 884 749 76 130774 34981 12428 19743 ...
## $ X1.week.change : int 737 709 4282 23 201 10 36642 2409 2875 815 ...
## $ X1.week...increase : num 2.07 17 18.07 2.6 26.84 ...
## $ WHO.Region : Factor w/ 6 levels "Africa","Americas",..: 3 4 1 4 1 2 2 4 6 4 ...
Kita dapat mengetahui tipe-tipe data masing-masing variabel dan nama-nama variabel dalam dataset. ### Mengecek Missing Data Missing data sangat mempengaruhi hasil analisis, pada nantinya akan kita isi atau hapus. Namun sebelumnya dicek keberadaanya terlebih dahulu dengan syntax berikut:
sapply(df, function(x) sum(is.na(x)))
## Country.Region Confirmed Deaths
## 0 0 0
## Recovered Active New.cases
## 0 0 0
## New.deaths New.recovered Deaths...100.Cases
## 0 0 0
## Recovered...100.Cases Deaths...100.Recovered Confirmed.last.week
## 0 0 0
## X1.week.change X1.week...increase WHO.Region
## 0 0 0
Untuk lebih memudahkan dalam membaca missing data, dapat ditampilkan dalam visualisasi berikut:
heatmaply_na(
df[1:20,],
showticklabels = c(TRUE, FALSE)
)
Hasil plot di atas berupa tampilan interaktif, yang mana bagian dengan warna hitam adalah bagian data yang hilang. Hasil plot di atas efektif untuk data dengan jumlah baris yang sedikit, untuk jumlah data yang banyak dapat digunakan sytax berikut:
vis_miss(df)
Dari ketiga hasil di atas diketahui bahwa tidak ada kolom dengan missing data ### Mengecek Outlier Outlier adalah data yang berbeda dengan data lainnya. Nilai ini kadang menjadi nilai yang penting untuk diamati, namun kadang juga menjadi gangguan pada penerapan metode Machine Learning. Pada modul ini, nantinya nilai ini akan dihapus dengan pertimbangan tertentu. Kemudian, untuk melihat apakah ada outlier atau tidak dalam suatu dataset dapat dilihat melalui boxplot berikut:
num_cols <- unlist(lapply(df, is.numeric)) #Memilih kolom bertipe numerik
df_num <- df[ , num_cols]
boxplot(df_num)
## Warning in bplt(at[i], wid = width[i], stats = z$stats[, i], out = z$out[z$group
## == : Outlier (Inf) in boxplot 10 is not drawn
### Melihat Korelasi Data
plot_correlation(df_num)
## Warning: Removed 24 rows containing missing values (geom_text).
### Melihat Statistik data
summary(df)
## Country.Region Confirmed Deaths
## Afghanistan : 1 Min. : 10 Min. : 0.0
## Albania : 1 1st Qu.: 1114 1st Qu.: 18.5
## Algeria : 1 Median : 5059 Median : 108.0
## Andorra : 1 Mean : 88131 Mean : 3497.5
## Angola : 1 3rd Qu.: 40460 3rd Qu.: 734.0
## Antigua and Barbuda: 1 Max. :4290259 Max. :148011.0
## (Other) :181
## Recovered Active New.cases New.deaths
## Min. : 0.0 Min. : 0.0 Min. : 0.0 Min. : 0.00
## 1st Qu.: 626.5 1st Qu.: 141.5 1st Qu.: 4.0 1st Qu.: 0.00
## Median : 2815.0 Median : 1600.0 Median : 49.0 Median : 1.00
## Mean : 50631.5 Mean : 34001.9 Mean : 1223.0 Mean : 28.96
## 3rd Qu.: 22606.0 3rd Qu.: 9149.0 3rd Qu.: 419.5 3rd Qu.: 6.00
## Max. :1846641.0 Max. :2816444.0 Max. :56336.0 Max. :1076.00
##
## New.recovered Deaths...100.Cases Recovered...100.Cases
## Min. : 0.0 Min. : 0.000 Min. : 0.00
## 1st Qu.: 0.0 1st Qu.: 0.945 1st Qu.: 48.77
## Median : 22.0 Median : 2.150 Median : 71.32
## Mean : 933.8 Mean : 3.020 Mean : 64.82
## 3rd Qu.: 221.0 3rd Qu.: 3.875 3rd Qu.: 86.89
## Max. :33728.0 Max. :28.560 Max. :100.00
##
## Deaths...100.Recovered Confirmed.last.week X1.week.change X1.week...increase
## Min. :0.00 Min. : 10 Min. : -47 Min. : -3.840
## 1st Qu.:1.45 1st Qu.: 1052 1st Qu.: 49 1st Qu.: 2.775
## Median :3.62 Median : 5020 Median : 432 Median : 6.890
## Mean : Inf Mean : 78682 Mean : 9448 Mean : 13.606
## 3rd Qu.:6.44 3rd Qu.: 37080 3rd Qu.: 3172 3rd Qu.: 16.855
## Max. : Inf Max. :3834677 Max. :455582 Max. :226.320
##
## WHO.Region
## Africa :48
## Americas :35
## Eastern Mediterranean:22
## Europe :56
## South-East Asia :10
## Western Pacific :16
##
d <- melt(df_num)
## No id variables; using all as measure variables
ggplot(d,aes(x = value)) +
facet_wrap(~variable,scales = "free_x") +
geom_histogram()
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## Warning: Removed 5 rows containing non-finite values (stat_bin).
Plot ini untuk melihat apakah variabel-variabel pada dataset berdistribusi normal. ### Pair Plot
pairs.panels(df_num,
method = "pearson", # correlation method
hist.col = "#00AFBB",
density = TRUE, # show density plots
ellipses = TRUE # show correlation ellipses
)
Data preprocessing ini digunakan guna menyiapkan data untuk diklasifikasi menggunakan metode SVM(Hanya Contoh).
Setelah mengetahui hasil EDA di atas maka untuk hasil yang baik diperlukan beberapa hal sebagai berikut:
Setelah data diperbaiki dilakukan langkah sebagai berikut:
[Note] * Ini hanya contoh untuk melakukan pengisian data NaN(Kosong), nama kabin mungkin menjadi penting sehingga tidak segampang itu diganti
df = subset(df, select = -c(Country.Region) )
head(df)
## Confirmed Deaths Recovered Active New.cases New.deaths New.recovered
## 1 36263 1269 25198 9796 106 10 18
## 2 4880 144 2745 1991 117 6 63
## 3 27973 1163 18837 7973 616 8 749
## 4 907 52 803 52 10 0 0
## 5 950 41 242 667 18 1 0
## 6 86 3 65 18 4 0 5
## Deaths...100.Cases Recovered...100.Cases Deaths...100.Recovered
## 1 3.50 69.49 5.04
## 2 2.95 56.25 5.25
## 3 4.16 67.34 6.17
## 4 5.73 88.53 6.48
## 5 4.32 25.47 16.94
## 6 3.49 75.58 4.62
## Confirmed.last.week X1.week.change X1.week...increase WHO.Region
## 1 35526 737 2.07 Eastern Mediterranean
## 2 4171 709 17.00 Europe
## 3 23691 4282 18.07 Africa
## 4 884 23 2.60 Europe
## 5 749 201 26.84 Africa
## 6 76 10 13.16 Americas
df$WHO.Region<- unclass(df$WHO.Region)
df
## Confirmed Deaths Recovered Active New.cases New.deaths New.recovered
## 1 36263 1269 25198 9796 106 10 18
## 2 4880 144 2745 1991 117 6 63
## 3 27973 1163 18837 7973 616 8 749
## 4 907 52 803 52 10 0 0
## 5 950 41 242 667 18 1 0
## 6 86 3 65 18 4 0 5
## 7 167416 3059 72575 91782 4890 120 2057
## 8 37390 711 26665 10014 73 6 187
## 9 15303 167 9311 5825 368 6 137
## 10 20558 713 18246 1599 86 1 37
## 11 30446 423 23242 6781 396 6 558
## 12 382 11 91 280 40 0 0
## 13 39482 141 36110 3231 351 1 421
## 14 226225 2965 125683 97577 2772 37 1801
## 15 110 7 94 9 0 0 0
## 16 67251 538 60492 6221 119 4 67
## 17 66428 9822 17452 39154 402 1 14
## 18 48 2 26 20 0 0 0
## 19 1770 35 1036 699 0 0 0
## 20 99 0 86 13 4 0 1
## 21 71181 2647 21478 47056 1752 64 309
## 22 10498 294 4930 5274 731 14 375
## 23 739 2 63 674 53 1 11
## 24 2442375 87618 1846641 508116 23284 614 33728
## 25 141 3 138 0 0 0 0
## 26 10621 347 5585 4689 194 7 230
## 27 1100 53 926 121 14 0 6
## 28 350 6 292 52 0 0 2
## 29 378 1 301 76 17 0 22
## 30 2328 22 1550 756 21 0 103
## 31 226 0 147 79 1 0 4
## 32 17110 391 14539 2180 402 6 0
## 33 116458 8944 0 107514 682 11 0
## 34 4599 59 1546 2994 0 0 0
## 35 922 75 810 37 7 0 0
## 36 347923 9187 319954 18782 2133 75 1859
## 37 86783 4656 78869 3258 213 4 7
## 38 257101 8777 131161 117163 16306 508 11494
## 39 354 7 328 19 0 0 0
## 40 3200 54 829 2317 162 3 73
## 41 8844 208 5700 2936 13 4 190
## 42 15841 115 3824 11902 612 11 88
## 43 15655 96 10361 5198 59 0 183
## 44 4881 139 3936 806 24 3 70
## 45 2532 87 2351 94 37 0 2
## 46 1060 19 852 189 3 0 0
## 47 15516 373 11428 3715 192 2 0
## 48 13761 613 12605 543 109 0 77
## 49 5059 58 4977 24 9 0 11
## 50 18 0 18 0 0 0 0
## 51 64156 1083 30204 32869 1248 20 1601
## 52 81161 5532 34896 40733 467 17 0
## 53 92482 4652 34838 52992 420 46 1007
## 54 15035 408 7778 6849 405 8 130
## 55 3071 51 842 2178 0 0 0
## 56 265 0 191 74 2 0 2
## 57 2034 69 1923 42 0 0 1
## 58 2316 34 1025 1257 109 2 39
## 59 14547 228 6386 7933 579 5 170
## 60 27 0 18 9 0 0 0
## 61 7398 329 6920 149 5 0 0
## 62 220352 30212 81212 108928 2551 17 267
## 63 7189 49 4682 2458 205 0 219
## 64 326 8 66 252 49 2 6
## 65 1137 16 922 199 6 0 2
## 66 207112 9125 190314 7673 445 1 259
## 67 33624 168 29801 3655 655 0 307
## 68 4227 202 1374 2651 34 0 0
## 69 14 0 13 1 1 0 0
## 70 23 0 23 0 0 0 0
## 71 45309 1761 32455 11093 256 27 843
## 72 7055 45 6257 753 47 2 105
## 73 1954 26 803 1125 0 0 0
## 74 389 20 181 188 19 0 0
## 75 7340 158 4365 2817 25 1 0
## 76 12 0 12 0 0 0 0
## 77 39741 1166 5039 33536 465 50 117
## 78 4448 596 3329 523 13 0 0
## 79 1854 10 1823 21 7 0 0
## 80 1480073 33408 951166 495499 44457 637 33598
## 81 100303 4838 58173 37292 1525 57 1518
## 82 293606 15912 255144 22550 2434 212 1931
## 83 112585 4458 77144 30983 2553 96 1927
## 84 25892 1764 23364 764 11 0 0
## 85 63985 474 27133 36378 2029 4 108
## 86 246286 35112 198593 12581 168 5 147
## 87 853 10 714 129 11 0 0
## 88 31142 998 21970 8174 594 0 364
## 89 1176 11 1041 124 8 0 0
## 90 84648 585 54404 29659 1526 0 1833
## 91 17975 285 7833 9857 372 5 90
## 92 7413 185 4027 3201 496 16 274
## 93 64379 438 55057 8884 606 5 684
## 94 33296 1301 21205 10790 483 24 817
## 95 20 0 19 1 0 0 0
## 96 1219 31 1045 143 0 0 0
## 97 3882 51 1709 2122 132 0 17
## 98 505 12 128 365 0 0 0
## 99 1167 72 646 449 5 0 5
## 100 2827 64 577 2186 158 4 24
## 101 86 1 81 4 0 0 0
## 102 2019 80 1620 319 11 0 4
## 103 6321 112 4825 1384 49 0 178
## 104 9690 91 6260 3339 395 6 681
## 105 3664 99 1645 1920 24 0 6
## 106 8904 124 8601 179 7 0 1
## 107 3369 15 2547 807 67 0 19
## 108 2513 124 1913 476 3 1 2
## 109 701 9 665 27 1 0 0
## 110 6208 156 4653 1399 37 0 223
## 111 344 10 332 2 0 0 0
## 112 395489 44022 303810 47657 4973 342 8588
## 113 23154 748 16154 6252 120 13 245
## 114 116 4 104 8 0 0 0
## 115 289 0 222 67 1 0 4
## 116 2893 45 809 2039 94 2 70
## 117 20887 316 16553 4018 609 3 115
## 118 1701 11 0 1690 32 0 0
## 119 1843 8 101 1734 68 0 26
## 120 18752 48 13754 4950 139 3 626
## 121 53413 6160 189 47064 419 1 0
## 122 1557 22 1514 21 1 0 1
## 123 3439 108 2492 839 0 0 0
## 124 1132 69 1027 36 0 0 0
## 125 41180 860 18203 22117 648 2 829
## 126 10213 466 5564 4183 127 6 137
## 127 9132 255 8752 125 15 0 0
## 128 77058 393 57028 19637 1053 9 1729
## 129 274289 5842 241026 27421 1176 20 3592
## 130 61442 1322 35086 25034 1146 28 955
## 131 62 0 11 51 0 0 0
## 132 4548 43 2905 1600 104 2 111
## 133 389717 18418 272547 98752 13756 575 4697
## 134 82040 1945 26446 53649 1592 13 336
## 135 43402 1676 32856 8870 337 5 103
## 136 50299 1719 35375 13205 135 2 158
## 137 109597 165 106328 3104 292 0 304
## 138 45902 2206 25794 17902 1104 19 151
## 139 816680 13334 602249 201097 5607 85 3077
## 140 1879 5 975 899 58 0 57
## 141 17 0 15 2 0 0 0
## 142 24 0 22 2 0 0 0
## 143 52 0 39 13 0 0 0
## 144 699 42 657 0 0 0 0
## 145 865 14 734 117 2 0 38
## 146 268934 2760 222936 43238 1993 27 2613
## 147 9764 194 6477 3093 83 3 68
## 148 24141 543 0 23598 411 9 0
## 149 114 0 39 75 0 0 0
## 150 1783 66 1317 400 0 0 4
## 151 50838 27 45692 5119 469 0 171
## 152 2181 28 1616 537 2 0 39
## 153 2087 116 1733 238 5 0 55
## 154 3196 93 1543 1560 18 0 22
## 155 452529 7067 274925 170537 7096 298 9848
## 156 14203 300 13007 896 28 1 102
## 157 2305 46 1175 1084 43 1 0
## 158 272421 28432 150376 93613 0 0 0
## 159 2805 11 2121 673 23 0 15
## 160 11424 720 5939 4765 39 3 49
## 161 1483 24 925 534 44 1 35
## 162 79395 5700 0 73695 398 3 0
## 163 34477 1978 30900 1599 65 1 200
## 164 674 40 0 634 24 2 0
## 165 462 7 440 15 4 0 0
## 166 7235 60 6028 1147 43 1 58
## 167 509 21 183 305 0 0 0
## 168 3297 58 3111 128 6 0 2
## 169 24 0 0 24 0 0 0
## 170 874 18 607 249 6 0 8
## 171 148 8 128 12 1 0 0
## 172 1455 50 1157 248 3 0 15
## 173 227019 5630 210469 10920 919 17 982
## 174 4290259 148011 1325804 2816444 56336 1076 27941
## 175 1128 2 986 140 13 0 4
## 176 67096 1636 37202 28258 835 11 317
## 177 59177 345 52510 6322 264 1 328
## 178 301708 45844 1437 254427 688 7 3
## 179 1202 35 951 216 10 1 3
## 180 21209 121 11674 9414 678 5 569
## 181 15988 146 9959 5883 525 4 213
## 182 431 0 365 66 11 0 0
## 183 10621 78 3752 6791 152 2 0
## 184 10 1 8 1 0 0 0
## 185 1691 483 833 375 10 4 36
## 186 4552 140 2815 1597 71 1 465
## 187 2704 36 542 2126 192 2 24
## Deaths...100.Cases Recovered...100.Cases Deaths...100.Recovered
## 1 3.50 69.49 5.04
## 2 2.95 56.25 5.25
## 3 4.16 67.34 6.17
## 4 5.73 88.53 6.48
## 5 4.32 25.47 16.94
## 6 3.49 75.58 4.62
## 7 1.83 43.35 4.21
## 8 1.90 71.32 2.67
## 9 1.09 60.84 1.79
## 10 3.47 88.75 3.91
## 11 1.39 76.34 1.82
## 12 2.88 23.82 12.09
## 13 0.36 91.46 0.39
## 14 1.31 55.56 2.36
## 15 6.36 85.45 7.45
## 16 0.80 89.95 0.89
## 17 14.79 26.27 56.28
## 18 4.17 54.17 7.69
## 19 1.98 58.53 3.38
## 20 0.00 86.87 0.00
## 21 3.72 30.17 12.32
## 22 2.80 46.96 5.96
## 23 0.27 8.53 3.17
## 24 3.59 75.61 4.74
## 25 2.13 97.87 2.17
## 26 3.27 52.58 6.21
## 27 4.82 84.18 5.72
## 28 1.71 83.43 2.05
## 29 0.26 79.63 0.33
## 30 0.95 66.58 1.42
## 31 0.00 65.04 0.00
## 32 2.29 84.97 2.69
## 33 7.68 0.00 Inf
## 34 1.28 33.62 3.82
## 35 8.13 87.85 9.26
## 36 2.64 91.96 2.87
## 37 5.37 90.88 5.90
## 38 3.41 51.02 6.69
## 39 1.98 92.66 2.13
## 40 1.69 25.91 6.51
## 41 2.35 64.45 3.65
## 42 0.73 24.14 3.01
## 43 0.61 66.18 0.93
## 44 2.85 80.64 3.53
## 45 3.44 92.85 3.70
## 46 1.79 80.38 2.23
## 47 2.40 73.65 3.26
## 48 4.45 91.60 4.86
## 49 1.15 98.38 1.17
## 50 0.00 100.00 0.00
## 51 1.69 47.08 3.59
## 52 6.82 43.00 15.85
## 53 5.03 37.67 13.35
## 54 2.71 51.73 5.25
## 55 1.66 27.42 6.06
## 56 0.00 72.08 0.00
## 57 3.39 94.54 3.59
## 58 1.47 44.26 3.32
## 59 1.57 43.90 3.57
## 60 0.00 66.67 0.00
## 61 4.45 93.54 4.75
## 62 13.71 36.86 37.20
## 63 0.68 65.13 1.05
## 64 2.45 20.25 12.12
## 65 1.41 81.09 1.74
## 66 4.41 91.89 4.79
## 67 0.50 88.63 0.56
## 68 4.78 32.51 14.70
## 69 0.00 92.86 0.00
## 70 0.00 100.00 0.00
## 71 3.89 71.63 5.43
## 72 0.64 88.69 0.72
## 73 1.33 41.10 3.24
## 74 5.14 46.53 11.05
## 75 2.15 59.47 3.62
## 76 0.00 100.00 0.00
## 77 2.93 12.68 23.14
## 78 13.40 74.84 17.90
## 79 0.54 98.33 0.55
## 80 2.26 64.26 3.51
## 81 4.82 58.00 8.32
## 82 5.42 86.90 6.24
## 83 3.96 68.52 5.78
## 84 6.81 90.24 7.55
## 85 0.74 42.41 1.75
## 86 14.26 80.64 17.68
## 87 1.17 83.70 1.40
## 88 3.20 70.55 4.54
## 89 0.94 88.52 1.06
## 90 0.69 64.27 1.08
## 91 1.59 43.58 3.64
## 92 2.50 54.32 4.59
## 93 0.68 85.52 0.80
## 94 3.91 63.69 6.14
## 95 0.00 95.00 0.00
## 96 2.54 85.73 2.97
## 97 1.31 44.02 2.98
## 98 2.38 25.35 9.38
## 99 6.17 55.36 11.15
## 100 2.26 20.41 11.09
## 101 1.16 94.19 1.23
## 102 3.96 80.24 4.94
## 103 1.77 76.33 2.32
## 104 0.94 64.60 1.45
## 105 2.70 44.90 6.02
## 106 1.39 96.60 1.44
## 107 0.45 75.60 0.59
## 108 4.93 76.12 6.48
## 109 1.28 94.86 1.35
## 110 2.51 74.95 3.35
## 111 2.91 96.51 3.01
## 112 11.13 76.82 14.49
## 113 3.23 69.77 4.63
## 114 3.45 89.66 3.85
## 115 0.00 76.82 0.00
## 116 1.56 27.96 5.56
## 117 1.51 79.25 1.91
## 118 0.65 0.00 Inf
## 119 0.43 5.48 7.92
## 120 0.26 73.35 0.35
## 121 11.53 0.35 3259.26
## 122 1.41 97.24 1.45
## 123 3.14 72.46 4.33
## 124 6.10 90.72 6.72
## 125 2.09 44.20 4.72
## 126 4.56 54.48 8.38
## 127 2.79 95.84 2.91
## 128 0.51 74.01 0.69
## 129 2.13 87.87 2.42
## 130 2.15 57.10 3.77
## 131 0.00 17.74 0.00
## 132 0.95 63.87 1.48
## 133 4.73 69.93 6.76
## 134 2.37 32.24 7.35
## 135 3.86 75.70 5.10
## 136 3.42 70.33 4.86
## 137 0.15 97.02 0.16
## 138 4.81 56.19 8.55
## 139 1.63 73.74 2.21
## 140 0.27 51.89 0.51
## 141 0.00 88.24 0.00
## 142 0.00 91.67 0.00
## 143 0.00 75.00 0.00
## 144 6.01 93.99 6.39
## 145 1.62 84.86 1.91
## 146 1.03 82.90 1.24
## 147 1.99 66.34 3.00
## 148 2.25 0.00 Inf
## 149 0.00 34.21 0.00
## 150 3.70 73.86 5.01
## 151 0.05 89.88 0.06
## 152 1.28 74.09 1.73
## 153 5.56 83.04 6.69
## 154 2.91 48.28 6.03
## 155 1.56 60.75 2.57
## 156 2.11 91.58 2.31
## 157 2.00 50.98 3.91
## 158 10.44 55.20 18.91
## 159 0.39 75.61 0.52
## 160 6.30 51.99 12.12
## 161 1.62 62.37 2.59
## 162 7.18 0.00 Inf
## 163 5.74 89.62 6.40
## 164 5.93 0.00 Inf
## 165 1.52 95.24 1.59
## 166 0.83 83.32 1.00
## 167 4.13 35.95 11.48
## 168 1.76 94.36 1.86
## 169 0.00 0.00 0.00
## 170 2.06 69.45 2.97
## 171 5.41 86.49 6.25
## 172 3.44 79.52 4.32
## 173 2.48 92.71 2.67
## 174 3.45 30.90 11.16
## 175 0.18 87.41 0.20
## 176 2.44 55.45 4.40
## 177 0.58 88.73 0.66
## 178 15.19 0.48 3190.26
## 179 2.91 79.12 3.68
## 180 0.57 55.04 1.04
## 181 0.91 62.29 1.47
## 182 0.00 84.69 0.00
## 183 0.73 35.33 2.08
## 184 10.00 80.00 12.50
## 185 28.56 49.26 57.98
## 186 3.08 61.84 4.97
## 187 1.33 20.04 6.64
## Confirmed.last.week X1.week.change X1.week...increase WHO.Region
## 1 35526 737 2.07 3
## 2 4171 709 17.00 4
## 3 23691 4282 18.07 1
## 4 884 23 2.60 4
## 5 749 201 26.84 1
## 6 76 10 13.16 2
## 7 130774 36642 28.02 2
## 8 34981 2409 6.89 4
## 9 12428 2875 23.13 6
## 10 19743 815 4.13 4
## 11 27890 2556 9.16 4
## 12 174 208 119.54 2
## 13 36936 2546 6.89 3
## 14 207453 18772 9.05 5
## 15 106 4 3.77 2
## 16 66213 1038 1.57 4
## 17 64094 2334 3.64 4
## 18 40 8 20.00 2
## 19 1602 168 10.49 1
## 20 90 9 10.00 5
## 21 60991 10190 16.71 2
## 22 8479 2019 23.81 4
## 23 522 217 41.57 1
## 24 2118646 323729 15.28 2
## 25 141 0 0.00 6
## 26 8929 1692 18.95 4
## 27 1065 35 3.29 1
## 28 341 9 2.64 5
## 29 322 56 17.39 1
## 30 2071 257 12.41 1
## 31 171 55 32.16 6
## 32 16157 953 5.90 1
## 33 112925 3533 3.13 2
## 34 4548 51 1.12 1
## 35 889 33 3.71 1
## 36 333029 14894 4.47 2
## 37 85622 1161 1.36 6
## 38 204005 53096 26.03 2
## 39 334 20 5.99 1
## 40 2851 349 12.24 1
## 41 8443 401 4.75 1
## 42 11534 4307 37.34 2
## 43 14312 1343 9.38 1
## 44 4370 511 11.69 4
## 45 2446 86 3.52 2
## 46 1038 22 2.12 4
## 47 14098 1418 10.06 4
## 48 13453 308 2.29 4
## 49 5020 39 0.78 3
## 50 18 0 0.00 2
## 51 53956 10200 18.90 2
## 52 74620 6541 8.77 2
## 53 88402 4080 4.62 3
## 54 12207 2828 23.17 2
## 55 3071 0 0.00 1
## 56 251 14 5.58 1
## 57 2021 13 0.64 4
## 58 1826 490 26.83 1
## 59 10207 4340 42.52 1
## 60 27 0 0.00 6
## 61 7340 58 0.79 4
## 62 214023 6329 2.96 4
## 63 6433 756 11.75 1
## 64 112 214 191.07 1
## 65 1039 98 9.43 4
## 66 203325 3787 1.86 4
## 67 28430 5194 18.27 1
## 68 4012 215 5.36 4
## 69 13 1 7.69 4
## 70 23 0 0.00 2
## 71 39039 6270 16.06 2
## 72 6590 465 7.06 1
## 73 1949 5 0.26 1
## 74 337 52 15.43 2
## 75 7053 287 4.07 2
## 76 12 0 0.00 4
## 77 34611 5130 14.82 2
## 78 4339 109 2.51 4
## 79 1839 15 0.82 4
## 80 1155338 324735 28.11 5
## 81 88214 12089 13.70 5
## 82 276202 17404 6.30 3
## 83 94693 17892 18.89 3
## 84 25766 126 0.49 4
## 85 52003 11982 23.04 4
## 86 244624 1662 0.68 4
## 87 809 44 5.44 2
## 88 25706 5436 21.15 6
## 89 1223 -47 -3.84 3
## 90 73468 11180 15.22 4
## 91 13771 4204 30.53 1
## 92 5877 1536 26.14 4
## 93 59763 4616 7.72 3
## 94 27143 6153 22.67 4
## 95 19 1 5.26 6
## 96 1192 27 2.27 4
## 97 2905 977 33.63 3
## 98 359 146 40.67 1
## 99 1107 60 5.42 1
## 100 1980 847 42.78 3
## 101 86 0 0.00 4
## 102 1947 72 3.70 4
## 103 5639 682 12.09 4
## 104 7153 2537 35.47 1
## 105 2992 672 22.46 1
## 106 8800 104 1.18 6
## 107 2999 370 12.34 5
## 108 2475 38 1.54 1
## 109 677 24 3.55 4
## 110 5923 285 4.81 1
## 111 343 1 0.29 1
## 112 349396 46093 13.19 2
## 113 21115 2039 9.66 4
## 114 109 7 6.42 4
## 115 287 2 0.70 6
## 116 2188 705 32.22 4
## 117 17562 3325 18.93 3
## 118 1507 194 12.87 1
## 119 1344 499 37.13 1
## 120 17844 908 5.09 5
## 121 52132 1281 2.46 4
## 122 1555 2 0.13 6
## 123 3147 292 9.28 2
## 124 1105 27 2.44 1
## 125 37225 3955 10.62 1
## 126 9249 964 10.42 4
## 127 9034 98 1.08 4
## 128 68400 8658 12.66 3
## 129 266096 8193 3.08 3
## 130 54426 7016 12.89 2
## 131 19 43 226.32 6
## 132 3748 800 21.34 2
## 133 357681 32036 8.96 2
## 134 68898 13142 19.07 6
## 135 40383 3019 7.48 4
## 136 48771 1528 3.13 4
## 137 107037 2560 2.39 3
## 138 38139 7763 20.35 4
## 139 776212 40468 5.21 4
## 140 1629 250 15.35 1
## 141 17 0 0.00 2
## 142 23 1 4.35 2
## 143 50 2 4.00 2
## 144 699 0 0.00 4
## 145 746 119 15.95 1
## 146 253349 15585 6.15 3
## 147 8948 816 9.12 1
## 148 21253 2888 13.59 4
## 149 108 6 5.56 1
## 150 1711 72 4.21 1
## 151 48035 2803 5.84 6
## 152 1980 201 10.15 4
## 153 1953 134 6.86 4
## 154 3130 66 2.11 3
## 155 373628 78901 21.12 1
## 156 13816 387 2.80 6
## 157 2211 94 4.25 1
## 158 264836 7585 2.86 4
## 159 2730 75 2.75 5
## 160 10992 432 3.93 3
## 161 1079 404 37.44 2
## 162 78048 1347 1.73 4
## 163 33634 843 2.51 4
## 164 522 152 29.12 3
## 165 451 11 2.44 6
## 166 6921 314 4.54 4
## 167 509 0 0.00 1
## 168 3250 47 1.45 5
## 169 24 0 0.00 5
## 170 783 91 11.62 1
## 171 137 11 8.03 2
## 172 1381 74 5.36 3
## 173 220572 6447 2.92 4
## 174 3834677 455582 11.88 2
## 175 1069 59 5.52 1
## 176 60767 6329 10.42 4
## 177 57193 1984 3.47 3
## 178 296944 4764 1.60 4
## 179 1064 138 12.97 2
## 180 17149 4060 23.67 4
## 181 12334 3654 29.63 2
## 182 384 47 12.24 6
## 183 8916 1705 19.12 3
## 184 10 0 0.00 1
## 185 1619 72 4.45 3
## 186 3326 1226 36.86 1
## 187 1713 991 57.85 1
#' Detect outliers using IQR method
#'
#' @param x A numeric vector
#' @param na.rm Whether to exclude NAs when computing quantiles
#'
is_outlier <- function(x, na.rm = FALSE) {
qs = quantile(x, probs = c(0.25, 0.75), na.rm = na.rm)
lowerq <- qs[1]
upperq <- qs[2]
iqr = upperq - lowerq
extreme.threshold.upper = (iqr * 3) + upperq
extreme.threshold.lower = lowerq - (iqr * 3)
# Return logical vector
x > extreme.threshold.upper | x < extreme.threshold.lower
}
#' Remove rows with outliers in given columns
#'
#' Any row with at least 1 outlier will be removed
#'
#' @param df A data.frame
#' @param cols Names of the columns of interest. Defaults to all columns.
#'
#'
remove_outliers <- function(df, cols = names(df)) {
for (col in cols) {
cat("Removing outliers in column: ", col, " \n")
df <- df[!is_outlier(df[[col]]),]
}
df
}
vars_of_interest <- c("Country.Region", "Confirmed", "Deaths", "Recovered","Active","New.cases","New.deaths","New.recovered","Deaths...100.Cases","Recovered...100.Cases","Deaths...100.Recovered","Confirmed.last.week","X1.week.change","X1.week...increase","WHO.Region")
df_filtered <- remove_outliers(df, vars_of_interest)
## Removing outliers in column: Country.Region
## Removing outliers in column: Confirmed
## Removing outliers in column: Deaths
## Removing outliers in column: Recovered
## Removing outliers in column: Active
## Removing outliers in column: New.cases
## Removing outliers in column: New.deaths
## Removing outliers in column: New.recovered
## Removing outliers in column: Deaths...100.Cases
## Removing outliers in column: Recovered...100.Cases
## Removing outliers in column: Deaths...100.Recovered
## Removing outliers in column: Confirmed.last.week
## Removing outliers in column: X1.week.change
## Removing outliers in column: X1.week...increase
## Removing outliers in column: WHO.Region
unit_length <- function(x) {
x / sqrt(sum(x^2))
}
unit_length_df <- as.data.frame(lapply(df, unit_length))
head(unit_length_df)
## Confirmed Deaths Recovered Active New.cases New.deaths
## 1 6.759322e-03 6.404015e-03 9.385989e-03 3.324846e-03 1.330747e-03 0.0059371882
## 2 9.096184e-04 7.266967e-04 1.022484e-03 6.757624e-04 1.468843e-03 0.0035623129
## 3 5.214089e-03 5.869085e-03 7.016584e-03 2.706104e-03 7.733398e-03 0.0047497506
## 4 1.690623e-04 2.624183e-04 2.991090e-04 1.764924e-05 1.255422e-04 0.0000000000
## 5 1.770773e-04 2.069067e-04 9.014245e-05 2.263855e-04 2.259759e-04 0.0005937188
## 6 1.603016e-05 1.513951e-05 2.421181e-05 6.109353e-06 5.021687e-05 0.0000000000
## New.recovered Deaths...100.Cases Recovered...100.Cases Deaths...100.Recovered
## 1 3.068732e-04 0.05587063 0.07267571 0
## 2 1.074056e-03 0.04709096 0.05882874 0
## 3 1.276934e-02 0.06640623 0.07042715 0
## 4 0.000000e+00 0.09146820 0.09258859 0
## 5 0.000000e+00 0.06896032 0.02663765 0
## 6 8.524256e-05 0.05571100 0.07904490 0
## Confirmed.last.week X1.week.change X1.week...increase WHO.Region
## 1 7.499292e-03 1.115899e-03 0.005410859 0.06534103
## 2 8.804691e-04 1.073504e-03 0.044437003 0.08712137
## 3 5.001005e-03 6.483416e-03 0.047233920 0.02178034
## 4 1.866063e-04 3.482451e-05 0.006796247 0.08712137
## 5 1.581087e-04 3.043360e-04 0.070158185 0.02178034
## 6 1.604307e-05 1.514109e-05 0.034399468 0.04356068
y=df$WHO.Region
x=data.matrix(df[-c(14)])
y
## [1] 3 4 1 4 1 2 2 4 6 4 4 2 3 5 2 4 4 2 1 5 2 4 1 2 6 4 1 5 1 1 6 1 2 1 1 2 6
## [38] 2 1 1 1 2 1 4 2 4 4 4 3 2 2 2 3 2 1 1 4 1 1 6 4 4 1 1 4 4 1 4 4 2 2 1 1 2
## [75] 2 4 2 4 4 5 5 3 3 4 4 4 2 6 3 4 1 4 3 4 6 4 3 1 1 3 4 4 4 1 1 6 5 1 4 1 1
## [112] 2 4 4 6 4 3 1 1 5 4 6 2 1 1 4 4 3 3 2 6 2 2 6 4 4 3 4 4 1 2 2 2 4 1 3 1 4
## [149] 1 1 6 4 4 3 1 6 1 4 5 3 2 4 4 3 6 4 1 5 5 1 2 3 4 2 1 4 3 4 2 4 2 6 3 1 3
## [186] 1 1
## attr(,"levels")
## [1] "Africa" "Americas" "Eastern Mediterranean"
## [4] "Europe" "South-East Asia" "Western Pacific"
x
## Confirmed Deaths Recovered Active New.cases New.deaths New.recovered
## 1 36263 1269 25198 9796 106 10 18
## 2 4880 144 2745 1991 117 6 63
## 3 27973 1163 18837 7973 616 8 749
## 4 907 52 803 52 10 0 0
## 5 950 41 242 667 18 1 0
## 6 86 3 65 18 4 0 5
## 7 167416 3059 72575 91782 4890 120 2057
## 8 37390 711 26665 10014 73 6 187
## 9 15303 167 9311 5825 368 6 137
## 10 20558 713 18246 1599 86 1 37
## 11 30446 423 23242 6781 396 6 558
## 12 382 11 91 280 40 0 0
## 13 39482 141 36110 3231 351 1 421
## 14 226225 2965 125683 97577 2772 37 1801
## 15 110 7 94 9 0 0 0
## 16 67251 538 60492 6221 119 4 67
## 17 66428 9822 17452 39154 402 1 14
## 18 48 2 26 20 0 0 0
## 19 1770 35 1036 699 0 0 0
## 20 99 0 86 13 4 0 1
## 21 71181 2647 21478 47056 1752 64 309
## 22 10498 294 4930 5274 731 14 375
## 23 739 2 63 674 53 1 11
## 24 2442375 87618 1846641 508116 23284 614 33728
## 25 141 3 138 0 0 0 0
## 26 10621 347 5585 4689 194 7 230
## 27 1100 53 926 121 14 0 6
## 28 350 6 292 52 0 0 2
## 29 378 1 301 76 17 0 22
## 30 2328 22 1550 756 21 0 103
## 31 226 0 147 79 1 0 4
## 32 17110 391 14539 2180 402 6 0
## 33 116458 8944 0 107514 682 11 0
## 34 4599 59 1546 2994 0 0 0
## 35 922 75 810 37 7 0 0
## 36 347923 9187 319954 18782 2133 75 1859
## 37 86783 4656 78869 3258 213 4 7
## 38 257101 8777 131161 117163 16306 508 11494
## 39 354 7 328 19 0 0 0
## 40 3200 54 829 2317 162 3 73
## 41 8844 208 5700 2936 13 4 190
## 42 15841 115 3824 11902 612 11 88
## 43 15655 96 10361 5198 59 0 183
## 44 4881 139 3936 806 24 3 70
## 45 2532 87 2351 94 37 0 2
## 46 1060 19 852 189 3 0 0
## 47 15516 373 11428 3715 192 2 0
## 48 13761 613 12605 543 109 0 77
## 49 5059 58 4977 24 9 0 11
## 50 18 0 18 0 0 0 0
## 51 64156 1083 30204 32869 1248 20 1601
## 52 81161 5532 34896 40733 467 17 0
## 53 92482 4652 34838 52992 420 46 1007
## 54 15035 408 7778 6849 405 8 130
## 55 3071 51 842 2178 0 0 0
## 56 265 0 191 74 2 0 2
## 57 2034 69 1923 42 0 0 1
## 58 2316 34 1025 1257 109 2 39
## 59 14547 228 6386 7933 579 5 170
## 60 27 0 18 9 0 0 0
## 61 7398 329 6920 149 5 0 0
## 62 220352 30212 81212 108928 2551 17 267
## 63 7189 49 4682 2458 205 0 219
## 64 326 8 66 252 49 2 6
## 65 1137 16 922 199 6 0 2
## 66 207112 9125 190314 7673 445 1 259
## 67 33624 168 29801 3655 655 0 307
## 68 4227 202 1374 2651 34 0 0
## 69 14 0 13 1 1 0 0
## 70 23 0 23 0 0 0 0
## 71 45309 1761 32455 11093 256 27 843
## 72 7055 45 6257 753 47 2 105
## 73 1954 26 803 1125 0 0 0
## 74 389 20 181 188 19 0 0
## 75 7340 158 4365 2817 25 1 0
## 76 12 0 12 0 0 0 0
## 77 39741 1166 5039 33536 465 50 117
## 78 4448 596 3329 523 13 0 0
## 79 1854 10 1823 21 7 0 0
## 80 1480073 33408 951166 495499 44457 637 33598
## 81 100303 4838 58173 37292 1525 57 1518
## 82 293606 15912 255144 22550 2434 212 1931
## 83 112585 4458 77144 30983 2553 96 1927
## 84 25892 1764 23364 764 11 0 0
## 85 63985 474 27133 36378 2029 4 108
## 86 246286 35112 198593 12581 168 5 147
## 87 853 10 714 129 11 0 0
## 88 31142 998 21970 8174 594 0 364
## 89 1176 11 1041 124 8 0 0
## 90 84648 585 54404 29659 1526 0 1833
## 91 17975 285 7833 9857 372 5 90
## 92 7413 185 4027 3201 496 16 274
## 93 64379 438 55057 8884 606 5 684
## 94 33296 1301 21205 10790 483 24 817
## 95 20 0 19 1 0 0 0
## 96 1219 31 1045 143 0 0 0
## 97 3882 51 1709 2122 132 0 17
## 98 505 12 128 365 0 0 0
## 99 1167 72 646 449 5 0 5
## 100 2827 64 577 2186 158 4 24
## 101 86 1 81 4 0 0 0
## 102 2019 80 1620 319 11 0 4
## 103 6321 112 4825 1384 49 0 178
## 104 9690 91 6260 3339 395 6 681
## 105 3664 99 1645 1920 24 0 6
## 106 8904 124 8601 179 7 0 1
## 107 3369 15 2547 807 67 0 19
## 108 2513 124 1913 476 3 1 2
## 109 701 9 665 27 1 0 0
## 110 6208 156 4653 1399 37 0 223
## 111 344 10 332 2 0 0 0
## 112 395489 44022 303810 47657 4973 342 8588
## 113 23154 748 16154 6252 120 13 245
## 114 116 4 104 8 0 0 0
## 115 289 0 222 67 1 0 4
## 116 2893 45 809 2039 94 2 70
## 117 20887 316 16553 4018 609 3 115
## 118 1701 11 0 1690 32 0 0
## 119 1843 8 101 1734 68 0 26
## 120 18752 48 13754 4950 139 3 626
## 121 53413 6160 189 47064 419 1 0
## 122 1557 22 1514 21 1 0 1
## 123 3439 108 2492 839 0 0 0
## 124 1132 69 1027 36 0 0 0
## 125 41180 860 18203 22117 648 2 829
## 126 10213 466 5564 4183 127 6 137
## 127 9132 255 8752 125 15 0 0
## 128 77058 393 57028 19637 1053 9 1729
## 129 274289 5842 241026 27421 1176 20 3592
## 130 61442 1322 35086 25034 1146 28 955
## 131 62 0 11 51 0 0 0
## 132 4548 43 2905 1600 104 2 111
## 133 389717 18418 272547 98752 13756 575 4697
## 134 82040 1945 26446 53649 1592 13 336
## 135 43402 1676 32856 8870 337 5 103
## 136 50299 1719 35375 13205 135 2 158
## 137 109597 165 106328 3104 292 0 304
## 138 45902 2206 25794 17902 1104 19 151
## 139 816680 13334 602249 201097 5607 85 3077
## 140 1879 5 975 899 58 0 57
## 141 17 0 15 2 0 0 0
## 142 24 0 22 2 0 0 0
## 143 52 0 39 13 0 0 0
## 144 699 42 657 0 0 0 0
## 145 865 14 734 117 2 0 38
## 146 268934 2760 222936 43238 1993 27 2613
## 147 9764 194 6477 3093 83 3 68
## 148 24141 543 0 23598 411 9 0
## 149 114 0 39 75 0 0 0
## 150 1783 66 1317 400 0 0 4
## 151 50838 27 45692 5119 469 0 171
## 152 2181 28 1616 537 2 0 39
## 153 2087 116 1733 238 5 0 55
## 154 3196 93 1543 1560 18 0 22
## 155 452529 7067 274925 170537 7096 298 9848
## 156 14203 300 13007 896 28 1 102
## 157 2305 46 1175 1084 43 1 0
## 158 272421 28432 150376 93613 0 0 0
## 159 2805 11 2121 673 23 0 15
## 160 11424 720 5939 4765 39 3 49
## 161 1483 24 925 534 44 1 35
## 162 79395 5700 0 73695 398 3 0
## 163 34477 1978 30900 1599 65 1 200
## 164 674 40 0 634 24 2 0
## 165 462 7 440 15 4 0 0
## 166 7235 60 6028 1147 43 1 58
## 167 509 21 183 305 0 0 0
## 168 3297 58 3111 128 6 0 2
## 169 24 0 0 24 0 0 0
## 170 874 18 607 249 6 0 8
## 171 148 8 128 12 1 0 0
## 172 1455 50 1157 248 3 0 15
## 173 227019 5630 210469 10920 919 17 982
## 174 4290259 148011 1325804 2816444 56336 1076 27941
## 175 1128 2 986 140 13 0 4
## 176 67096 1636 37202 28258 835 11 317
## 177 59177 345 52510 6322 264 1 328
## 178 301708 45844 1437 254427 688 7 3
## 179 1202 35 951 216 10 1 3
## 180 21209 121 11674 9414 678 5 569
## 181 15988 146 9959 5883 525 4 213
## 182 431 0 365 66 11 0 0
## 183 10621 78 3752 6791 152 2 0
## 184 10 1 8 1 0 0 0
## 185 1691 483 833 375 10 4 36
## 186 4552 140 2815 1597 71 1 465
## 187 2704 36 542 2126 192 2 24
## Deaths...100.Cases Recovered...100.Cases Deaths...100.Recovered
## 1 3.50 69.49 5.04
## 2 2.95 56.25 5.25
## 3 4.16 67.34 6.17
## 4 5.73 88.53 6.48
## 5 4.32 25.47 16.94
## 6 3.49 75.58 4.62
## 7 1.83 43.35 4.21
## 8 1.90 71.32 2.67
## 9 1.09 60.84 1.79
## 10 3.47 88.75 3.91
## 11 1.39 76.34 1.82
## 12 2.88 23.82 12.09
## 13 0.36 91.46 0.39
## 14 1.31 55.56 2.36
## 15 6.36 85.45 7.45
## 16 0.80 89.95 0.89
## 17 14.79 26.27 56.28
## 18 4.17 54.17 7.69
## 19 1.98 58.53 3.38
## 20 0.00 86.87 0.00
## 21 3.72 30.17 12.32
## 22 2.80 46.96 5.96
## 23 0.27 8.53 3.17
## 24 3.59 75.61 4.74
## 25 2.13 97.87 2.17
## 26 3.27 52.58 6.21
## 27 4.82 84.18 5.72
## 28 1.71 83.43 2.05
## 29 0.26 79.63 0.33
## 30 0.95 66.58 1.42
## 31 0.00 65.04 0.00
## 32 2.29 84.97 2.69
## 33 7.68 0.00 Inf
## 34 1.28 33.62 3.82
## 35 8.13 87.85 9.26
## 36 2.64 91.96 2.87
## 37 5.37 90.88 5.90
## 38 3.41 51.02 6.69
## 39 1.98 92.66 2.13
## 40 1.69 25.91 6.51
## 41 2.35 64.45 3.65
## 42 0.73 24.14 3.01
## 43 0.61 66.18 0.93
## 44 2.85 80.64 3.53
## 45 3.44 92.85 3.70
## 46 1.79 80.38 2.23
## 47 2.40 73.65 3.26
## 48 4.45 91.60 4.86
## 49 1.15 98.38 1.17
## 50 0.00 100.00 0.00
## 51 1.69 47.08 3.59
## 52 6.82 43.00 15.85
## 53 5.03 37.67 13.35
## 54 2.71 51.73 5.25
## 55 1.66 27.42 6.06
## 56 0.00 72.08 0.00
## 57 3.39 94.54 3.59
## 58 1.47 44.26 3.32
## 59 1.57 43.90 3.57
## 60 0.00 66.67 0.00
## 61 4.45 93.54 4.75
## 62 13.71 36.86 37.20
## 63 0.68 65.13 1.05
## 64 2.45 20.25 12.12
## 65 1.41 81.09 1.74
## 66 4.41 91.89 4.79
## 67 0.50 88.63 0.56
## 68 4.78 32.51 14.70
## 69 0.00 92.86 0.00
## 70 0.00 100.00 0.00
## 71 3.89 71.63 5.43
## 72 0.64 88.69 0.72
## 73 1.33 41.10 3.24
## 74 5.14 46.53 11.05
## 75 2.15 59.47 3.62
## 76 0.00 100.00 0.00
## 77 2.93 12.68 23.14
## 78 13.40 74.84 17.90
## 79 0.54 98.33 0.55
## 80 2.26 64.26 3.51
## 81 4.82 58.00 8.32
## 82 5.42 86.90 6.24
## 83 3.96 68.52 5.78
## 84 6.81 90.24 7.55
## 85 0.74 42.41 1.75
## 86 14.26 80.64 17.68
## 87 1.17 83.70 1.40
## 88 3.20 70.55 4.54
## 89 0.94 88.52 1.06
## 90 0.69 64.27 1.08
## 91 1.59 43.58 3.64
## 92 2.50 54.32 4.59
## 93 0.68 85.52 0.80
## 94 3.91 63.69 6.14
## 95 0.00 95.00 0.00
## 96 2.54 85.73 2.97
## 97 1.31 44.02 2.98
## 98 2.38 25.35 9.38
## 99 6.17 55.36 11.15
## 100 2.26 20.41 11.09
## 101 1.16 94.19 1.23
## 102 3.96 80.24 4.94
## 103 1.77 76.33 2.32
## 104 0.94 64.60 1.45
## 105 2.70 44.90 6.02
## 106 1.39 96.60 1.44
## 107 0.45 75.60 0.59
## 108 4.93 76.12 6.48
## 109 1.28 94.86 1.35
## 110 2.51 74.95 3.35
## 111 2.91 96.51 3.01
## 112 11.13 76.82 14.49
## 113 3.23 69.77 4.63
## 114 3.45 89.66 3.85
## 115 0.00 76.82 0.00
## 116 1.56 27.96 5.56
## 117 1.51 79.25 1.91
## 118 0.65 0.00 Inf
## 119 0.43 5.48 7.92
## 120 0.26 73.35 0.35
## 121 11.53 0.35 3259.26
## 122 1.41 97.24 1.45
## 123 3.14 72.46 4.33
## 124 6.10 90.72 6.72
## 125 2.09 44.20 4.72
## 126 4.56 54.48 8.38
## 127 2.79 95.84 2.91
## 128 0.51 74.01 0.69
## 129 2.13 87.87 2.42
## 130 2.15 57.10 3.77
## 131 0.00 17.74 0.00
## 132 0.95 63.87 1.48
## 133 4.73 69.93 6.76
## 134 2.37 32.24 7.35
## 135 3.86 75.70 5.10
## 136 3.42 70.33 4.86
## 137 0.15 97.02 0.16
## 138 4.81 56.19 8.55
## 139 1.63 73.74 2.21
## 140 0.27 51.89 0.51
## 141 0.00 88.24 0.00
## 142 0.00 91.67 0.00
## 143 0.00 75.00 0.00
## 144 6.01 93.99 6.39
## 145 1.62 84.86 1.91
## 146 1.03 82.90 1.24
## 147 1.99 66.34 3.00
## 148 2.25 0.00 Inf
## 149 0.00 34.21 0.00
## 150 3.70 73.86 5.01
## 151 0.05 89.88 0.06
## 152 1.28 74.09 1.73
## 153 5.56 83.04 6.69
## 154 2.91 48.28 6.03
## 155 1.56 60.75 2.57
## 156 2.11 91.58 2.31
## 157 2.00 50.98 3.91
## 158 10.44 55.20 18.91
## 159 0.39 75.61 0.52
## 160 6.30 51.99 12.12
## 161 1.62 62.37 2.59
## 162 7.18 0.00 Inf
## 163 5.74 89.62 6.40
## 164 5.93 0.00 Inf
## 165 1.52 95.24 1.59
## 166 0.83 83.32 1.00
## 167 4.13 35.95 11.48
## 168 1.76 94.36 1.86
## 169 0.00 0.00 0.00
## 170 2.06 69.45 2.97
## 171 5.41 86.49 6.25
## 172 3.44 79.52 4.32
## 173 2.48 92.71 2.67
## 174 3.45 30.90 11.16
## 175 0.18 87.41 0.20
## 176 2.44 55.45 4.40
## 177 0.58 88.73 0.66
## 178 15.19 0.48 3190.26
## 179 2.91 79.12 3.68
## 180 0.57 55.04 1.04
## 181 0.91 62.29 1.47
## 182 0.00 84.69 0.00
## 183 0.73 35.33 2.08
## 184 10.00 80.00 12.50
## 185 28.56 49.26 57.98
## 186 3.08 61.84 4.97
## 187 1.33 20.04 6.64
## Confirmed.last.week X1.week.change X1.week...increase
## 1 35526 737 2.07
## 2 4171 709 17.00
## 3 23691 4282 18.07
## 4 884 23 2.60
## 5 749 201 26.84
## 6 76 10 13.16
## 7 130774 36642 28.02
## 8 34981 2409 6.89
## 9 12428 2875 23.13
## 10 19743 815 4.13
## 11 27890 2556 9.16
## 12 174 208 119.54
## 13 36936 2546 6.89
## 14 207453 18772 9.05
## 15 106 4 3.77
## 16 66213 1038 1.57
## 17 64094 2334 3.64
## 18 40 8 20.00
## 19 1602 168 10.49
## 20 90 9 10.00
## 21 60991 10190 16.71
## 22 8479 2019 23.81
## 23 522 217 41.57
## 24 2118646 323729 15.28
## 25 141 0 0.00
## 26 8929 1692 18.95
## 27 1065 35 3.29
## 28 341 9 2.64
## 29 322 56 17.39
## 30 2071 257 12.41
## 31 171 55 32.16
## 32 16157 953 5.90
## 33 112925 3533 3.13
## 34 4548 51 1.12
## 35 889 33 3.71
## 36 333029 14894 4.47
## 37 85622 1161 1.36
## 38 204005 53096 26.03
## 39 334 20 5.99
## 40 2851 349 12.24
## 41 8443 401 4.75
## 42 11534 4307 37.34
## 43 14312 1343 9.38
## 44 4370 511 11.69
## 45 2446 86 3.52
## 46 1038 22 2.12
## 47 14098 1418 10.06
## 48 13453 308 2.29
## 49 5020 39 0.78
## 50 18 0 0.00
## 51 53956 10200 18.90
## 52 74620 6541 8.77
## 53 88402 4080 4.62
## 54 12207 2828 23.17
## 55 3071 0 0.00
## 56 251 14 5.58
## 57 2021 13 0.64
## 58 1826 490 26.83
## 59 10207 4340 42.52
## 60 27 0 0.00
## 61 7340 58 0.79
## 62 214023 6329 2.96
## 63 6433 756 11.75
## 64 112 214 191.07
## 65 1039 98 9.43
## 66 203325 3787 1.86
## 67 28430 5194 18.27
## 68 4012 215 5.36
## 69 13 1 7.69
## 70 23 0 0.00
## 71 39039 6270 16.06
## 72 6590 465 7.06
## 73 1949 5 0.26
## 74 337 52 15.43
## 75 7053 287 4.07
## 76 12 0 0.00
## 77 34611 5130 14.82
## 78 4339 109 2.51
## 79 1839 15 0.82
## 80 1155338 324735 28.11
## 81 88214 12089 13.70
## 82 276202 17404 6.30
## 83 94693 17892 18.89
## 84 25766 126 0.49
## 85 52003 11982 23.04
## 86 244624 1662 0.68
## 87 809 44 5.44
## 88 25706 5436 21.15
## 89 1223 -47 -3.84
## 90 73468 11180 15.22
## 91 13771 4204 30.53
## 92 5877 1536 26.14
## 93 59763 4616 7.72
## 94 27143 6153 22.67
## 95 19 1 5.26
## 96 1192 27 2.27
## 97 2905 977 33.63
## 98 359 146 40.67
## 99 1107 60 5.42
## 100 1980 847 42.78
## 101 86 0 0.00
## 102 1947 72 3.70
## 103 5639 682 12.09
## 104 7153 2537 35.47
## 105 2992 672 22.46
## 106 8800 104 1.18
## 107 2999 370 12.34
## 108 2475 38 1.54
## 109 677 24 3.55
## 110 5923 285 4.81
## 111 343 1 0.29
## 112 349396 46093 13.19
## 113 21115 2039 9.66
## 114 109 7 6.42
## 115 287 2 0.70
## 116 2188 705 32.22
## 117 17562 3325 18.93
## 118 1507 194 12.87
## 119 1344 499 37.13
## 120 17844 908 5.09
## 121 52132 1281 2.46
## 122 1555 2 0.13
## 123 3147 292 9.28
## 124 1105 27 2.44
## 125 37225 3955 10.62
## 126 9249 964 10.42
## 127 9034 98 1.08
## 128 68400 8658 12.66
## 129 266096 8193 3.08
## 130 54426 7016 12.89
## 131 19 43 226.32
## 132 3748 800 21.34
## 133 357681 32036 8.96
## 134 68898 13142 19.07
## 135 40383 3019 7.48
## 136 48771 1528 3.13
## 137 107037 2560 2.39
## 138 38139 7763 20.35
## 139 776212 40468 5.21
## 140 1629 250 15.35
## 141 17 0 0.00
## 142 23 1 4.35
## 143 50 2 4.00
## 144 699 0 0.00
## 145 746 119 15.95
## 146 253349 15585 6.15
## 147 8948 816 9.12
## 148 21253 2888 13.59
## 149 108 6 5.56
## 150 1711 72 4.21
## 151 48035 2803 5.84
## 152 1980 201 10.15
## 153 1953 134 6.86
## 154 3130 66 2.11
## 155 373628 78901 21.12
## 156 13816 387 2.80
## 157 2211 94 4.25
## 158 264836 7585 2.86
## 159 2730 75 2.75
## 160 10992 432 3.93
## 161 1079 404 37.44
## 162 78048 1347 1.73
## 163 33634 843 2.51
## 164 522 152 29.12
## 165 451 11 2.44
## 166 6921 314 4.54
## 167 509 0 0.00
## 168 3250 47 1.45
## 169 24 0 0.00
## 170 783 91 11.62
## 171 137 11 8.03
## 172 1381 74 5.36
## 173 220572 6447 2.92
## 174 3834677 455582 11.88
## 175 1069 59 5.52
## 176 60767 6329 10.42
## 177 57193 1984 3.47
## 178 296944 4764 1.60
## 179 1064 138 12.97
## 180 17149 4060 23.67
## 181 12334 3654 29.63
## 182 384 47 12.24
## 183 8916 1705 19.12
## 184 10 0 0.00
## 185 1619 72 4.45
## 186 3326 1226 36.86
## 187 1713 991 57.85